package cn.ilovese.collect.po.task;

import cn.ilovese.collect.vo.task.TaskVO;
import lombok.Data;
import lombok.NonNull;

import java.util.Date;

@Data
public class Task {
    private Integer id;

    private Integer userId;

    private String taskName;

    private String description;

    private Date startTime;

    private Date endTime;

    private Integer totalNumber;

    private Integer needNumber;

    private String type;

    private String environment;

    private Integer reportNumber;

    private Integer reportPrice;

    public Task(@NonNull TaskVO task){
        id=task.getId();
        userId=task.getUserId();
        taskName=task.getTaskName();
        description=task.getDescription();
        startTime = task.getStartTime();
        endTime = task.getEndTime();
        totalNumber = task.getTotalNumber();
        needNumber  = task.getNeedNumber();
        type = task.getType();
        environment = task.getEnvironment();
        reportNumber = 0;
        reportPrice=task.getReportPrice();
    }

    public Task(){

    }
}